import { ObjCreate } from "../../common/ObjCreate";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { FilterConst } from "../../../../component/gconst/FilterConst";
import { GLoadedButton } from "../../../../../com/mui/controls/GLoadedButton";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
//class AchievementGetBonusButton
    
    export  class AchievementGetBonusButton /* flash.display.Sprite */
    {
        constructor(arg1: number, arg2: number, arg3: Object /* flash.display.DisplayObjectContainer */)
        {
            
            this.btn = ObjCreate.createGLoadedButton(ResFileConst.AchievementGetBonusBtn, 0, 0, 52, 24, this);
            this.btn.label = "";
            var loc1=GlobalStyle.textFormat1;
            this._txt = ObjCreate.createGTextField("", 0, 4, 50, 20, this);
            (loc1 = this._txt.defaultTextFormat).align = flash.text.TextFormatAlign.CENTER;
            this._txt.defaultTextFormat = loc1;
            this._txt.textColor = 16775938;
            this._txt.mouseEnabled = false;
            this.addChild(this._txt);
            this.x = arg1;
            this.y = arg2;
            arg3.addChild(this);
            this.buttonMode = true;
            return;
        }

        public set enabled(arg1: Boolean)
        {
            this.btn.enabled = arg1;
            if (arg1) 
            {
                this._txt.textColor = 16775938;
                this.btn.filters = [];
            }
            else 
            {
                this._txt.textColor = 8355711;
                this.btn.filters = [FilterConst.colorFilter2];
            }
            return;
        }

        public set label(arg1: string)
        {
            this._txt.text = arg1;
            return;
        }

        /* internal */ /* var */btn: GLoadedButton;

        /* internal */ /* var */_txt: GTextFiled;
    }
